package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.AddLayoutEntity;
import com.sgb.kjwl.model.entity.AlbumEntity;
import com.swgk.core.view.entity.AliProofEntity;
import com.sgb.kjwl.model.entity.ArrEntity;
import com.sgb.link.entity.BrandEntity;
import com.sgb.kjwl.model.entity.AddBrandEntity3;
import com.swgk.core.view.entity.GoodsPublishEntity;
import com.swgk.core.view.entity.MenuEntity;
import com.sgb.kjwl.model.entity.STArrEntity;
import com.sgb.kjwl.model.entity.STPublishEntity;
import com.sgb.kjwl.model.entity.StorageEntity;
import com.sgb.kjwl.model.entity.StorageInfoEntity;
import com.sgb.jicai.entity.CommodityParamValBean;
import com.sgb.link.entity.GetSkuEntity;
import com.sgb.kjwl.model.entity.user.UnitEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;


import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by cfk on 2020/3/31.
 */

public interface SelfGoodsPublishAPI {
    //仓储-列表
    @FormUrlEncoded
    @POST("v1/app/management/shop/getStorageList")
    Call<BaseEntity<ListResponse<List<StorageEntity>>>> getStorageList(@Field("text") String text,@Field("companyId") String companyId,@Field("pageNum") String pageNum,@Field("pageSize") String pageSize);

    //仓储-新增
    @POST("v1/app/management/shop/saveStorage")
    Call<BaseEntity> saveStorage(@Body StorageInfoEntity storageInfoEntity);

    //品牌-列表
    @FormUrlEncoded
    @POST("v1/app/user/goods/brandList")
    Call<BaseEntity<List<BrandEntity>>> getBrandList(@Field("id") String id, @Field("text") String text,@Field("companyId") String companyId);

    //品牌-新增
    @POST("v1/app/management/shop/saveBrand")
    Call<BaseEntity> saveBrand(@Body AddBrandEntity3 storageInfoEntity);

    //属性列表  /v1/app/material/buyer/getSupplierGetParamVal  v1/app/material/buyer/materChoose
    @FormUrlEncoded
    @POST("v1/app/material/buyer/getSupplierGetParamVal")
    Call<BaseEntity<List<ArrEntity>>> getMaterChoose(@Field("id") String id, @Field("areaCode") String areaCode);

    //商品单位列表
    @FormUrlEncoded
    @POST("v1/app/user/goods/unitList")
    Call<BaseEntity<List<UnitEntity>>> getUnitList(@Field("text") String text);

    //商品分类
    @FormUrlEncoded
    @POST("v1/app/user/goods/goodsCategory")
    Call<BaseEntity<List<MenuEntity<MenuEntity<MenuEntity>>>>> getGoodsCategory(@Field("areaCode") String areaCode);

    //商品发布
    @POST("v1/app/user/goods/goodsPublish")
    Call<BaseEntity> goodsPublish(@Body GoodsPublishEntity goodsPublishEntity);

    //获取视频参数
    @POST("v1/app/common/getVideoParams")
    Call<BaseEntity<AliProofEntity>> getVideoParams();

    //获取商砼强度和外加剂
    @POST("v1/app/user/goods/concreteAttrs")
    Call<BaseEntity<List<STArrEntity>>> concreteAttrs();

    //商砼发布
    @POST("v1/app/user/goods/concretePublish")
    Call<BaseEntity> concretePublish(@Body STPublishEntity stPublishEntity);

    //商砼发布详情
    @FormUrlEncoded
    @POST("v1/app/user/goods/concretePublishDetail")
    Call<BaseEntity<STPublishEntity>> concretePublishDetail(@Field("id") String id);

    //判断是否可以配置规格
    @FormUrlEncoded
    @POST("v1/app/user/goods/getSku")
    Call<BaseEntity<List<GetSkuEntity>>> getSku(@Field("id") String cid3);

    //判断是否可以配置规格
    @Headers({BaseUrlInterceptor.HEADERS_URL_JC, "tokenType:pc"})
    @GET("v1/app/groupBuy/getSupplierGetParamVal")
    Call<BaseEntity<List<CommodityParamValBean>>> getCommodityParamVal(@Query("id") String cid3);

    //网络相册列表
    @FormUrlEncoded
    @POST("v1/app/user/goods/getSupplierAlbumByCName")
    Call<BaseEntity<List<AlbumEntity>>> getSupplierAlbumByCName(@Field("cid") String cid);

    //网络相册
    @FormUrlEncoded
    @POST("v1/app/user/goods/getSupplierPhotosByAlbumId")
    Call<BaseEntity<List<AlbumEntity>>> getSupplierPhotosByAlbumId(@Field("id") String id);

    //获取其他信息
    @GET("v1/app/user/goods/customizeTitle/getTitleColumnsByCatId")
    Call<BaseEntity<List<AddLayoutEntity<List<AddLayoutEntity>>>>> getAddLayout(@Query("catId") String catId);

    //编辑时候获取商品其他信息
    @GET("v1/app/user/goods/customizeTitle/getTitleColumnsByItemId")
    Call<BaseEntity<List<AddLayoutEntity<List<AddLayoutEntity>>>>> getGoodsOtherInfo(@Query("itemId") String itemId);

    //编辑时候获取商砼其他信息
    @GET("v1/app/user/goods/customizeTitle/getTitleColumnsByConcreteId")
    Call<BaseEntity<List<AddLayoutEntity<List<AddLayoutEntity>>>>> getStOtherInfo(@Query("concreteId") String concreteId);
}
